﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Distribution_Maintain.aspx.cs" Inherits="masterdata_Distribution_Maintain" MasterPageFile="~/MasterPage.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>添加经销商</title>
    <script src="../JavaScript/empchecks.js" type="text/javascript"></script>

    <script src="../JavaScript/common.js" type="text/javascript"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle" colspan="4">
                    查询条件
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    经销商编号
                </td>
                <td nowrap="nowrap">
                   
                    <asp:TextBox ID="txtCode" runat="server"></asp:TextBox>
                   
                </td>
                <td class="tablefield">
                    经销商名称
                </td>
                <td nowrap="nowrap">
                   
                    <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                   
                </td>
                
            </tr>
          
            <tr>
                <td class="tablefield">
                    分配类型</td>
                <td nowrap="nowrap">
                   
                    <asp:DropDownList runat="server" ID="ddlAssigned" Width="130">
                    </asp:DropDownList>
                   
                </td>
                <td class="tablefield">
                    &nbsp;</td>
                <td nowrap="nowrap">
                   
                    &nbsp;</td>
                
            </tr>
          
            <tr>
                <td class="buttonarea" colspan="4">
                    <asp:Button ID="btnQuery" runat="server" class="wsd_button2" Text="查询" 
                        onclick="btnQuery_Click" />
                    &nbsp;&nbsp;
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_listtable" width="100%">
            <tr>
                <td style="width: 100%">
                    <asp:GridView Width="100%" ID="gvDistribution" runat="server" AutoGenerateColumns="false"
                        EmptyDataText="没有可显示的数据." EmptyDataRowStyle-Font-Bold="true" EmptyDataRowStyle-HorizontalAlign="Center"
                        EnableEmptyContentRender="true" AllowPaging="True"
                         PageSize="20" onpageindexchanging="gvDistribution_PageIndexChanging" 
                        DataKeyNames="id,CCID" onrowdatabound="gvDistribution_RowDataBound">
                        <HeaderStyle CssClass="titlist" />
                        <EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                        <Columns>
                           
                            <asp:BoundField HeaderText="编号" DataField="code" />
                            <asp:BoundField HeaderText="经销商" DataField="description" />
                            <asp:TemplateField HeaderText="供应商">
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlSupply" runat="server">
                                    </asp:DropDownList>
                                    
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="全选">
                                <HeaderTemplate>
                                    <asp:CheckBox runat="server" ID="HeaderLevelCheckBox" onclick="CheckAll('gvDistribution',this,'cbxSelected')" />全选
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox runat="server" ID="cbxSelected" Checked='<%# Convert.ToBoolean(Eval("Selected")) %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            
                        </Columns>
                        <RowStyle CssClass="evenline" />
                        <AlternatingRowStyle CssClass="oddline" />
                        <PagerSettings PageButtonCount="30" FirstPageText="首页" LastPageText="尾页" Mode="NumericFirstLast"
                            NextPageText="下一页" PreviousPageText="上一页" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td width="100%" class="tabletitle" >
                    操作选项
                </td>
            </tr>
            <tr>
                <td class="buttonarea">
                    <asp:Button ID="btnSubmiet" runat="server" class="wsd_button2" Text="提  交" OnClick="btnSubmit_Click" UseSubmitBehavior="false" />&nbsp;&nbsp;
                    <asp:Button ID="btnCancel" runat="server" class="wsd_button2" Text="返  回" CausesValidation="false"  OnClick="btnCancel_Click" />
                </td>
            </tr>
        </table>
    </div>
 </asp:Content>
